<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>script标签定义组件模版</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script id="cusComponent" type="text/x-template">
        <table>
            <tr>
                <td>名字</td>
                <td>性质</td>
            </tr>
            <tr>
                <td>Vue.js</td>
                <td>MVVM框架</td>
            </tr>
        </table>
    </script>
</head>
<body>

<div id="app">
    <custom-component></custom-component>
</div>

<script>
    Vue.component('custom-component', {
        template: '#cusComponent'
    });

    new Vue({
        el: '#app'
    });
</script>
</body>
</html>